.SUFFIXES: = .o .cpp

INCLUDE = -I../../../PostgreSQL/8.4/include
LIBDIRS = -L../../../PostgreSQL/8.4/lib
LIBS = -lpq  

TARGET = justconnect
SRCS = justconnect.cpp
OBJS = $(addsuffix .o, $(basename $(SRCS)))

.cpp.o:
	g++ -g -c $(INCLUDE) -o $@ $<

$(TARGET): $(OBJS)
	g++ $(LIBDIRS) $(LIBS) -o $@ $(OBJS)

all: $(TARGET)

clean:
	rm -f $(OBJS)

realclean: clean
	rm -f $(TARGET)
